Optimal. Leaf size=116 \[ -\frac{\sqrt{b} (3 a-5 b) \tan ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a}}\right )}{2 a^{7/2} f}-\frac{b (a-b) \tan (e+f x)}{2 a^3 f \left (a+b \tan ^2(e+f x)\right )}-\frac{(a-2 b) \cot (e+f x)}{a^3 f}-\frac{\cot ^3(e+f x)}{3 a^2 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.145864, antiderivative size = 116, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.174, Rules used = {3663, 456, 1261, 205} \[ -\frac{\sqrt{b} (3 a-5 b) \tan ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a}}\right )}{2 a^{7/2} f}-\frac{b (a-b) \tan (e+f x)}{2 a^3 f \left (a+b \tan ^2(e+f x)\right )}-\frac{(a-2 b) \cot (e+f x)}{a^3 f}-\frac{\cot ^3(e+f x)}{3 a^2 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3663
Rule 456
Rule 1261
Rule 205
Rubi steps
\begin{align*} \int \frac{\csc ^4(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{1+x^2}{x^4 \left (a+b x^2\right )^2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac{(a-b) b \tan (e+f x)}{2 a^3 f \left (a+b \tan ^2(e+f x)\right )}-\frac{b \operatorname{Subst}\left (\int \frac{-\frac{2}{a b}-\frac{2 (a-b) x^2}{a^2 b}+\frac{(a-b) x^4}{a^3}}{x^4 \left (a+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{2 f}\\ &=-\frac{(a-b) b \tan (e+f x)}{2 a^3 f \left (a+b \tan ^2(e+f x)\right )}-\frac{b \operatorname{Subst}\left (\int \left (-\frac{2}{a^2 b x^4}-\frac{2 (a-2 b)}{a^3 b x^2}+\frac{3 a-5 b}{a^3 \left (a+b x^2\right )}\right ) \, dx,x,\tan (e+f x)\right )}{2 f}\\ &=-\frac{(a-2 b) \cot (e+f x)}{a^3 f}-\frac{\cot ^3(e+f x)}{3 a^2 f}-\frac{(a-b) b \tan (e+f x)}{2 a^3 f \left (a+b \tan ^2(e+f x)\right )}-\frac{((3 a-5 b) b) \operatorname{Subst}\left (\int \frac{1}{a+b x^2} \, dx,x,\tan (e+f x)\right )}{2 a^3 f}\\ &=-\frac{(3 a-5 b) \sqrt{b} \tan ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a}}\right )}{2 a^{7/2} f}-\frac{(a-2 b) \cot (e+f x)}{a^3 f}-\frac{\cot ^3(e+f x)}{3 a^2 f}-\frac{(a-b) b \tan (e+f x)}{2 a^3 f \left (a+b \tan ^2(e+f x)\right )}\\ \end{align*}
Mathematica [A] time = 0.762804, size = 112, normalized size = 0.97 \[ \frac{3 \sqrt{b} (5 b-3 a) \tan ^{-1}\left (\frac{\sqrt{b} \tan (e+f x)}{\sqrt{a}}\right )+\sqrt{a} \left (\frac{3 b (b-a) \sin (2 (e+f x))}{(a-b) \cos (2 (e+f x))+a+b}-2 \cot (e+f x) \left (a \csc ^2(e+f x)+2 a-6 b\right )\right )}{6 a^{7/2} f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.095, size = 169, normalized size = 1.5 \begin{align*} -{\frac{1}{3\,f{a}^{2} \left ( \tan \left ( fx+e \right ) \right ) ^{3}}}-{\frac{1}{f{a}^{2}\tan \left ( fx+e \right ) }}+2\,{\frac{b}{f{a}^{3}\tan \left ( fx+e \right ) }}-{\frac{b\tan \left ( fx+e \right ) }{2\,f{a}^{2} \left ( a+b \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) }}+{\frac{{b}^{2}\tan \left ( fx+e \right ) }{2\,f{a}^{3} \left ( a+b \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) }}-{\frac{3\,b}{2\,f{a}^{2}}\arctan \left ({b\tan \left ( fx+e \right ){\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}}+{\frac{5\,{b}^{2}}{2\,f{a}^{3}}\arctan \left ({b\tan \left ( fx+e \right ){\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.20976, size = 1374, normalized size = 11.84 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.38018, size = 192, normalized size = 1.66 \begin{align*} -\frac{\frac{3 \,{\left (\pi \left \lfloor \frac{f x + e}{\pi } + \frac{1}{2} \right \rfloor \mathrm{sgn}\left (b\right ) + \arctan \left (\frac{b \tan \left (f x + e\right )}{\sqrt{a b}}\right )\right )}{\left (3 \, a b - 5 \, b^{2}\right )}}{\sqrt{a b} a^{3}} + \frac{3 \,{\left (a b \tan \left (f x + e\right ) - b^{2} \tan \left (f x + e\right )\right )}}{{\left (b \tan \left (f x + e\right )^{2} + a\right )} a^{3}} + \frac{2 \,{\left (3 \, a \tan \left (f x + e\right )^{2} - 6 \, b \tan \left (f x + e\right )^{2} + a\right )}}{a^{3} \tan \left (f x + e\right )^{3}}}{6 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]